const express = require('express');
const app = express();
const path = require('path');
const fs = require('fs');
const mysql = require('mysql');
app.listen(3000, () => { console.log('服务器已开启') });
const cors = require('cors');

app.use(cors());

app.get('/index', (req, res) => {
    res.send({ code: 200, msg: 'ok---get' })
})
app.post('/index', (req, res) => {
    res.send({ code: 200, msg: 'ok---post' })
})
app.put('/index', (req, res) => {
    res.send({ code: 200, msg: 'ok---put' })
})
app.delete('/index', (req, res) => {
    res.send({ code: 200, msg: 'ok---delete' })
})
